package personal.xjl.plusdemo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import personal.xjl.plusdemo.domain.Teacher;
import personal.xjl.plusdemo.service.TeacherService;
import personal.xjl.plusdemo.mapper.TeacherMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author kgy
* @description 针对表【teacher】的数据库操作Service实现
* @createDate 2024-12-03 11:15:46
*/
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher>
    implements TeacherService{
@Autowired
TeacherMapper teacherMapper;
    @Override
    public boolean login(String name, String password) {
        return !teacherMapper.login(name,password).isEmpty();
    }

    @Override
    public List<Teacher> getAllTeachers() {
        return teacherMapper.selectAll();

    }

}




